﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XH.SmartParking.IService;
using XH.SmartParking.Entities;

namespace XH.SmartParking.Service
{
    public class RecordService : BaseService, IRecordService
    {
        public RecordService(DbContext context) : base(context)
        {
        }

        public OrderInfo GetOrderByLicense(string licenseId)
        {
            return Query<OrderInfo>(o => o.AutoLicense == licenseId && o.State == 0)
                .FirstOrDefault();
        }
    }
}
